check if a substring is present in a given string using python